<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:job="livcos.org/ns/process/job"
  exclude-result-prefixes="job">
	
	<xsl:param name="toRootPath"/>
	
	<xsl:variable name="objId" select="''"/>
	<xsl:variable name="bakObjId" select="''"/>
	<xsl:variable name="response" select="''"/>
	
  <xsl:template match="/">
  	<job:copy ref="{$bakObjId}" target="{$objId}" overwrite="1"/>
    <job:feed stream="response" base="job" content-type="text/html">
      <html>
      	<body style="font-family: Verdana, Arial, Helvetica, sans-serif;">
        	<p>
        		<img src="{$toRootPath}/livcos.org/web/img/loading.gif"/>
        		<xsl:text> Redirecting to </xsl:text>
        		<a href="{$response}" style="text-decoration: none;">
        			<xsl:value-of select="$response"/>
        		</a>
        		<xsl:text>...</xsl:text>
        	</p>
          <script type="text/javascript">
            <xsl:text>window.setTimeout(function() { document.location.replace('</xsl:text>
            <xsl:value-of select="$response"/>
            <xsl:text>'); }, 2000);</xsl:text>
          </script>
        </body>
      </html>
    </job:feed>
  </xsl:template>
  
</xsl:stylesheet>
